﻿@using Single_SignOn.Areas.Handheld.Models
@using Single_SignOn.ResX
@using Single_SignOn.Models
@model IEnumerable<Single_SignOn.Areas.Handheld.Models.FunctionList>
<fieldset>
    <ol style="vertical-align: middle; width: 100%; text-align: center;">
        @foreach (FunctionList functionList in Model)
        {
            <li style="margin-top: 5px; vertical-align: middle; width: 100%; text-align: center;">
                <div style="margin-left: 5%; margin-right: 5%;">
                    <div style="width: 100%; background-color:#ffffff;height: 20px; vertical-align: middle;cursor:pointer;"
                         class="FunctionList" title="@functionList.Description"  data="@functionList.FuncNo">
                        <div style="margin-top: 0; height: 5px;"></div>
                        <div style="margin-top: 0; height: 10px; color: #000000;">
                            <label style="margin-top: 0; vertical-align: middle; height: 10px; font-weight: bolder;">@functionList.Application</label>
                        </div>
                        <div style="margin-top: 0; height: 5px;"></div>
                    </div>
                </div>
            </li>
        }
    </ol>
</fieldset>
<div class="display">
    <a id="urlFunctionList" href="@Html.AttributeEncode(Url.Action("GetToken", "FunctionList", new { applno = "", funcno = "", company = "", language = "" }))" style="display:none;"></a>

    <script type="text/javascript">
        /**/ $(document).ready(function () {
            $('.FunctionList').click(function () {
                document.location.href = $('#urlFunctionList').attr('href') + "?applno=" + $('#ApplNo').val() + "&funcno=" + $(this).attr('data') + "&company=" + $('#CompanyName').val() + "&language=" + $('#LanguageName').val();
            });
        });
    </script>
</div>
